<?PHP
if (!session_start()) { session_start(); };
/*if (!isset($_SESSION['lgnapproved'])) {
	die(header('Location: login.php'));
}*/

include("functions.php");
include("cnnxn.php");
connect();

if (isset($_GET['id'])) {

	$SQLdel='DELETE FROM av_events WHERE id='.$_GET['id'].';';
	$sendit_del=mysqli_query($db,$SQLdel) or die(mysqli_error($db));
	
	$SQLdeld='DELETE FROM av_eventdivisions WHERE eventid='.$_GET['id'].';';
	$sendit_deld=mysqli_query($db,$SQLdeld) or die(mysqli_error($db));
	
	$SQLdelp='DELETE FROM av_eventplayers WHERE eventid='.$_GET['id'].';';
	$sendit_delp=mysqli_query($db,$SQLdelp) or die(mysqli_error($db));
	
	die(header("Location: av_events_viewall.php"));
}
?>